<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>web</title>
		<style type="text/css">
			.box{
				width: 300px;
				height: 300px;
				border: 1px solid chartreuse;
				overflow: hidden;
			}
			.div1{
				width: 300px;
				height: 300px;
				background: red;
			}
			.div2{
				height: 300px;
				background: pink;
			}
			.div3{
				height: 300px;
				background: yellow;
			}
			a{
				border: 1px aqua solid;
			}
		</style>
	</head>
	<body>
		<a href="#div1">div1</a>
		<a href="#div2">div2</a>
		<a href="#div3">div3</a>
		<div class="box">
			<div class="div1" id="div1">div1</div>
			<div class="div2" id="div2">div2</div>
			<div class="div3" id="div3">div3</div>
		</div>
	</body>
</html>